Optimal. Leaf size=114 \[ \frac {a^4 \sin ^{1+n}(c+d x)}{d (1+n)}+\frac {4 a^4 \sin ^{2+n}(c+d x)}{d (2+n)}+\frac {6 a^4 \sin ^{3+n}(c+d x)}{d (3+n)}+\frac {4 a^4 \sin ^{4+n}(c+d x)}{d (4+n)}+\frac {a^4 \sin ^{5+n}(c+d x)}{d (5+n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 114, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {2912, 45}
\begin {gather*} \frac {a^4 \sin ^{n+1}(c+d x)}{d (n+1)}+\frac {4 a^4 \sin ^{n+2}(c+d x)}{d (n+2)}+\frac {6 a^4 \sin ^{n+3}(c+d x)}{d (n+3)}+\frac {4 a^4 \sin ^{n+4}(c+d x)}{d (n+4)}+\frac {a^4 \sin ^{n+5}(c+d x)}{d (n+5)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2912
Rubi steps
\begin {align*} \int \cos (c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^4 \, dx &=\frac {\text {Subst}\left (\int \left (\frac {x}{a}\right )^n (a+x)^4 \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\text {Subst}\left (\int \left (a^4 \left (\frac {x}{a}\right )^n+4 a^4 \left (\frac {x}{a}\right )^{1+n}+6 a^4 \left (\frac {x}{a}\right )^{2+n}+4 a^4 \left (\frac {x}{a}\right )^{3+n}+a^4 \left (\frac {x}{a}\right )^{4+n}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {a^4 \sin ^{1+n}(c+d x)}{d (1+n)}+\frac {4 a^4 \sin ^{2+n}(c+d x)}{d (2+n)}+\frac {6 a^4 \sin ^{3+n}(c+d x)}{d (3+n)}+\frac {4 a^4 \sin ^{4+n}(c+d x)}{d (4+n)}+\frac {a^4 \sin ^{5+n}(c+d x)}{d (5+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 80, normalized size = 0.70 \begin {gather*} \frac {a^4 \sin ^{1+n}(c+d x) \left (\frac {1}{1+n}+\frac {4 \sin (c+d x)}{2+n}+\frac {6 \sin ^2(c+d x)}{3+n}+\frac {4 \sin ^3(c+d x)}{4+n}+\frac {\sin ^4(c+d x)}{5+n}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.73, size = 0, normalized size = 0.00 \[\int \cos \left (d x +c \right ) \left (\sin ^{n}\left (d x +c \right )\right ) \left (a +a \sin \left (d x +c \right )\right )^{4}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 103, normalized size = 0.90 \begin {gather*} \frac {\frac {a^{4} \sin \left (d x + c\right )^{n + 5}}{n + 5} + \frac {4 \, a^{4} \sin \left (d x + c\right )^{n + 4}}{n + 4} + \frac {6 \, a^{4} \sin \left (d x + c\right )^{n + 3}}{n + 3} + \frac {4 \, a^{4} \sin \left (d x + c\right )^{n + 2}}{n + 2} + \frac {a^{4} \sin \left (d x + c\right )^{n + 1}}{n + 1}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 302 vs.
\(2 (114) = 228\).
time = 0.38, size = 302, normalized size = 2.65 \begin {gather*} \frac {{\left (8 \, a^{4} n^{4} + 96 \, a^{4} n^{3} + 400 \, a^{4} n^{2} + 672 \, a^{4} n + 4 \, {\left (a^{4} n^{4} + 11 \, a^{4} n^{3} + 41 \, a^{4} n^{2} + 61 \, a^{4} n + 30 \, a^{4}\right )} \cos \left (d x + c\right )^{4} + 360 \, a^{4} - 4 \, {\left (3 \, a^{4} n^{4} + 35 \, a^{4} n^{3} + 141 \, a^{4} n^{2} + 229 \, a^{4} n + 120 \, a^{4}\right )} \cos \left (d x + c\right )^{2} + {\left (8 \, a^{4} n^{4} + 96 \, a^{4} n^{3} + 400 \, a^{4} n^{2} + 672 \, a^{4} n + {\left (a^{4} n^{4} + 10 \, a^{4} n^{3} + 35 \, a^{4} n^{2} + 50 \, a^{4} n + 24 \, a^{4}\right )} \cos \left (d x + c\right )^{4} + 384 \, a^{4} - 4 \, {\left (2 \, a^{4} n^{4} + 23 \, a^{4} n^{3} + 91 \, a^{4} n^{2} + 142 \, a^{4} n + 72 \, a^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )\right )} \sin \left (d x + c\right )^{n}}{d n^{5} + 15 \, d n^{4} + 85 \, d n^{3} + 225 \, d n^{2} + 274 \, d n + 120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1833 vs.
\(2 (97) = 194\).
time = 5.93, size = 1833, normalized size = 16.08 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 127, normalized size = 1.11 \begin {gather*} \frac {\frac {a^{4} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5}}{n + 5} + \frac {4 \, a^{4} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{4}}{n + 4} + \frac {6 \, a^{4} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3}}{n + 3} + \frac {4 \, a^{4} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{2}}{n + 2} + \frac {a^{4} \sin \left (d x + c\right )^{n + 1}}{n + 1}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.76, size = 370, normalized size = 3.25 \begin {gather*} \frac {a^4\,{\sin \left (c+d\,x\right )}^n\,\left (4888\,n+5040\,\sin \left (c+d\,x\right )-2880\,\cos \left (2\,c+2\,d\,x\right )+240\,\cos \left (4\,c+4\,d\,x\right )-1080\,\sin \left (3\,c+3\,d\,x\right )+24\,\sin \left (5\,c+5\,d\,x\right )+8580\,n\,\sin \left (c+d\,x\right )-5376\,n\,\cos \left (2\,c+2\,d\,x\right )+488\,n\,\cos \left (4\,c+4\,d\,x\right )-2122\,n\,\sin \left (3\,c+3\,d\,x\right )+50\,n\,\sin \left (5\,c+5\,d\,x\right )+5014\,n^2\,\sin \left (c+d\,x\right )+1188\,n^3\,\sin \left (c+d\,x\right )+98\,n^4\,\sin \left (c+d\,x\right )+2872\,n^2+680\,n^3+56\,n^4-3200\,n^2\,\cos \left (2\,c+2\,d\,x\right )-768\,n^3\,\cos \left (2\,c+2\,d\,x\right )-64\,n^4\,\cos \left (2\,c+2\,d\,x\right )+328\,n^2\,\cos \left (4\,c+4\,d\,x\right )+88\,n^3\,\cos \left (4\,c+4\,d\,x\right )+8\,n^4\,\cos \left (4\,c+4\,d\,x\right )-1351\,n^2\,\sin \left (3\,c+3\,d\,x\right )-338\,n^3\,\sin \left (3\,c+3\,d\,x\right )-29\,n^4\,\sin \left (3\,c+3\,d\,x\right )+35\,n^2\,\sin \left (5\,c+5\,d\,x\right )+10\,n^3\,\sin \left (5\,c+5\,d\,x\right )+n^4\,\sin \left (5\,c+5\,d\,x\right )+2640\right )}{16\,d\,\left (n^5+15\,n^4+85\,n^3+225\,n^2+274\,n+120\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________